<?php
/*
*	NUSOAP Util
*	
*
*/
class HTTP_SOAP
{
	private static $instance;

	public static function singleton()
	{
         if (!isset(self::$instance)){
             $c = __CLASS__;
             self::$instance = new $c;
         }
         return self::$instance;
    }

	function getClient($endpoint,$wsdl = false,$proxyhost = false,$proxyport = false,$proxyusername = false, $proxypassword = false, $timeout = 0,							$response_timeout = 30){
		$c = new nusoap_client($endpoint,$wsdl,$proxyhost,$proxyport,$proxyusername , $proxypassword , $timeout , $response_timeout);
		$c->decode_utf8 = false;
		return $c;
	}

	function getFault($faultcode,$faultactor='',$faultstring='',$faultdetail=''){
		return new nusoap_fault($faultcode,$faultactor,$faultstring,$faultdetail);
	}

	function getServer($wsdl=false){
		$c = new nusoap_server($wsdl=false);
		$c->decode_utf8 = false;
		return $c;
	}
}
?>